package com.zhupanlin.zhyl.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhupanlin.zhyl.model.order.OrderInfo;
import com.zhupanlin.zhyl.vo.order.OrderCountQueryVo;
import com.zhupanlin.zhyl.vo.order.OrderQueryVo;

import java.util.Map;

/**
 * @author zhupanlin
 * @version 1.0
 * @description: TODO
 * @date 2024/12/7 20:51
 */
public interface OrderService extends IService<OrderInfo> {
    /**
     * 生成挂号订单
     * @param scheduleId
     * @param patientId
     * @return
     */
    Long saveOrder(String scheduleId, Long patientId);

    /**
     * 根据订单 id 查询订单详情
     * @param orderId
     * @return
     */
    OrderInfo getOrder(String orderId);

    /**
     * 订单列表（条件查询带分页）
     * @param pageParam
     * @param orderQueryVo
     * @return
     */
    IPage<OrderInfo> selectPage(Page<OrderInfo> pageParam, OrderQueryVo orderQueryVo);

    /**
     * 取消预约
     * @param orderId
     * @return
     */
    Boolean cancelOrder(Long orderId);

    /**
     * 就诊通知
     */
    void patientTips();

    /**
     * 预约统计
     * @param orderCountQueryVo
     * @return
     */
    Map<String, Object> getCountMap(OrderCountQueryVo orderCountQueryVo);
}
